package com.zzyl.nursing.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.github.pagehelper.Page;
import com.zzyl.nursing.dto.DeviceDataByDayDto;
import com.zzyl.nursing.vo.DeviceDataByDayVo;
import com.zzyl.nursing.vo.FamilyMemberElderVo;
import com.zzyl.nursing.vo.MyElderVo;
import org.apache.ibatis.annotations.Mapper;

import java.time.LocalDateTime;
import java.util.List;
import com.zzyl.nursing.domain.FamilyMemberElder;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

/**
 * 客户老人关联Mapper接口
 * 
 * @author alexis
 * @date 2025-01-20
 */
@Mapper
public interface FamilyMemberElderMapper extends BaseMapper<FamilyMemberElder>
{

    @Select("select f.id,family_member_id,elder_id,e.name elderName from family_member_elder f left join elder e on f.elder_id = e.id where f.family_member_id= #{fid}")
    List<MyElderVo> getMyElders(@Param("fid") Long fid);

    Page<FamilyMemberElderVo> selectElderInfo(@Param("mid") Long mid);


}
